﻿using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace DFGK_WMS.Context.Migrations
{
    public partial class 修改货架表结构 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "AreaCode",
                table: "TShelves");

            migrationBuilder.DropColumn(
                name: "AreaId",
                table: "TShelves");

            migrationBuilder.DropColumn(
                name: "AreaName",
                table: "TShelves");

            migrationBuilder.DropColumn(
                name: "AreaCode",
                table: "TCells");

            migrationBuilder.DropColumn(
                name: "AreaId",
                table: "TCells");

            migrationBuilder.DropColumn(
                name: "AreaName",
                table: "TCells");

            migrationBuilder.DropColumn(
                name: "RoutewayId",
                table: "TCells");

            migrationBuilder.AlterColumn<int>(
                name: "StackingStorageId",
                table: "TShippingLockCells",
                type: "int",
                nullable: true,
                oldClrType: typeof(decimal),
                oldType: "decimal(18,2)",
                oldNullable: true);

            migrationBuilder.AddColumn<decimal>(
                name: "Price",
                table: "TShippingLockCells",
                type: "decimal(18,2)",
                nullable: true);
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "Price",
                table: "TShippingLockCells");

            migrationBuilder.AlterColumn<decimal>(
                name: "StackingStorageId",
                table: "TShippingLockCells",
                type: "decimal(18,2)",
                nullable: true,
                oldClrType: typeof(int),
                oldType: "int",
                oldNullable: true);

            migrationBuilder.AddColumn<string>(
                name: "AreaCode",
                table: "TShelves",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<int>(
                name: "AreaId",
                table: "TShelves",
                type: "int",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<string>(
                name: "AreaName",
                table: "TShelves",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "AreaCode",
                table: "TCells",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<int>(
                name: "AreaId",
                table: "TCells",
                type: "int",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<string>(
                name: "AreaName",
                table: "TCells",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<int>(
                name: "RoutewayId",
                table: "TCells",
                type: "int",
                nullable: false,
                defaultValue: 0);
        }
    }
}
